<div class="constructionTeam main">
<!--   <bid-tabs
    query-fn="constructionTeam.queryConstruction"
    query-bean="constructionTeam.construction"
    query-param="pid"></bid-tabs> -->
    <zhb-bid-tabs
      query-fn="constructionTeam.queryConstruction"
      query-bean="constructionTeam.construction"
      query-param="pid"
      select-item="constructionTeam.selectItem"></zhb-bid-tabs>
  <div class="query-info shadowbox">
    <div class="container-header">施工队信息</div>
    <form class="base-info pa-form-content">
      <div class="pa-form-control pa-form-control-inline">
        <label class="name">施工队/部门:</label>
        <input type="text" name="team"
          ng-model="constructionTeam.construction.constructionTeamName"/>
      </div>
    </form>
    <div class="btn-outer-right">
      <a class="pa-btn"
        ng-click="constructionTeam.teamSearch()">
        <i class="fa fa-search"></i>
        <span class="ml5">查询</span>
      </a>
      <a class="pa-btn reset-btn"
        ng-click="constructionTeam.reset()">
        <i class="fa fa-repeat"></i>
        <span class="ml5">重置</span>
      </a>
    </div>
  </div>
  <div class="registration-code">
    <a class="pa-btn"
      authorization-btn="api/construction/insert"
      ng-show="constructionTeam.isShowAddConsZhb || constructionTeam.isShowAddConsZjb || constructionTeam.isShowAddConsXmb"
      ng-click="constructionTeam.newTeam()">新增施工队信息</a>
  </div>
  <div class="pa-table-container shadowbox">
    <form class="base-info">
      <table class="pa-table">
        <thead>
          <tr>
            <th>施工队/部门名称</th>
            <th>所属单位</th>
            <th>施工队人数</th>
            <th>创建时间</th>
            <th ng-show="constructionTeam.isShowAddConsZhb || constructionTeam.isShowAddConsZjb || constructionTeam.isShowAddConsXmb">操作</th>
          </tr>
        </thead>
        <tbody>
          <tr ng-repeat ="item in constructionTeam.constructionTeamlist">
            <td>{{item.constructionTeamName}}</td>
            <td>{{item.orgName}}</td>
            <td>{{item.num}}</td>
            <td>{{item.createTime}}</td>
            <td ng-show="constructionTeam.isShowAddConsZhb || constructionTeam.isShowAddConsZjb || constructionTeam.isShowAddConsXmb">
              <div class="del"
                authorization-btn="api/construction/select/s"
                ng-click="constructionTeam.openConstructionTeam(item.id)">
                <i class="fa fa-pencil color"></i>
                <span>编辑</span>
              </div>
              <div class="del"
                authorization-btn="api/construction/delete"
                ng-click="constructionTeam.deleteConstructionItem(item)">
                <i class="fa fa-trash color"></i>
                <span>删除</span>
              </div>
            </td>
          </tr>
        </tbody>
      </table>
      <div class="total-num">
        共计<span class="total-num-colorful">{{constructionTeam.paginationData.total}}</span>条
      </div>
      <!-- 分页 -->
      <div class="pagination-outer pagination-sm">
        <uib-pagination
          total-items="constructionTeam.paginationData.total"
          ng-model="constructionTeam.paginationData.pageNum"
          items-per-page="constructionTeam.paginationData.pageSize"
          ng-change="pageChange()"
          class="pagination-sm"
          boundary-link-numbers="true"
          max-size="5"
          next-text="下一页"
          previous-text="上一页"></uib-pagination>
      </div>
    </form>
  </div>
</div>

<!-- 新增施工队信息 -->
<script type="text/ng-template" id="newTeam">
  <div class="item-detail-dialog training-tech">
    <div class="item-detail-dialog-header">
      <div class="title-txt">
        <span>新增施工队信息</span>
      </div>
    </div>
    <div class="item-detail-dialog-content">
      <form name="addForm" novalidate>
        <div class="row-item">
          <div class="fixed-left-label">
            <b>*</b>施工队/部门：</div>
          <div class="right-value">
            <input type="text" name="team" required
              ng-model="cfgAdd.addItem.constructionTeamName"/>
          </div>
          <span class="error-tip"
            ng-show="(addForm.$submitted || addForm.team.$dirty) && addForm.team.$error.required">必填</span>
        </div>
        <div class="row-item">
          <div class="fixed-left-label">
            <b>*</b>所在单位：</div>
          <div class="right-value">
            <select name="type" required
              style="width: 100%;"
              ng-model="cfgAdd.addItem.pid">
              <option ng-repeat="item in constructionTeam.units"
                value="{{item.orgId}}">{{item.orgName}}</option>
            </select>
          </div>
          <span class="error-tip"
            ng-show="(addForm.$submitted || addForm.type.$dirty) && addForm.type.$error.required">必填</span>
        </div>
      </form>
    </div>
    <div class="item-detail-dialog-footer">
      <a class="pa-btn" ng-click="cfgAdd.submit(addForm)">
        <i class="fa fa-save"></i>
        <span class="ml5">确定</span>
      </a>
      <a class="pa-btn" ng-click="closeThisDialog()">
        <i class="fa fa-times"></i>
        <span class="ml5">取消</span>
      </a>
    </div>
  </div>
</script>

<!-- 编辑施工队信息 -->
<script type="text/ng-template" id="openTeam">
  <div class="item-detail-dialog training-tech">
    <div class="item-detail-dialog-header">
      <div class="title-txt">
        <span>编辑施工队信息</span>
      </div>
    </div>
    <div class="item-detail-dialog-content">
      <form name="editForm" novalidate>
        <div class="row-item">
          <div class="fixed-left-label">
            <b>*</b>施工队：</div>
          <div class="right-value">
            <input type="text" name="team" required
              ng-model="editConstructionItem.constructionTeamName"/>
          </div>
          <span class="error-tip"
                ng-show="(editForm.$submitted || editForm.team.$dirty) && editForm.team.$error.required">必填</span>
        </div>
        <div class="row-item">
          <div class="fixed-left-label">
            所在单位：</div>
          <div class="right-value">
            <select name="type"
              style="width: 100%;" disabled
              ng-model="editConstructionItem.pid">
              <option
                value="{{item.orgId}}"
                ng-repeat="item in constructionTeam.units">{{item.orgName}}</option>
            </select>
          </div>
        </div>
      </form>
    </div>
    <div class="item-detail-dialog-footer">
      <a class="pa-btn" ng-click="submit(editForm)">
        <i class="fa fa-save"></i>
        <span class="ml5">确定</span>
      </a>
      <a class="pa-btn" ng-click="closeThisDialog()">
        <i class="fa fa-times"></i>
        <span class="ml5">取消</span>
      </a>
    </div>
  </div>
</script>